<%--
  Created by IntelliJ IDEA.
  User: 13044
  Date: 2020/5/28
  Time: 14:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户登录页面</title>
    <script src="/js/jquery.js"></script>
    <script src="/js/user.js"></script>

</head>
<script>
    function changeImg(e) {
        e.src = '/code?date=' + Math.random();
    }

    function toRegisterJsp() {
        window.open("/back/userAdd.jsp");
        // document.getElementById("username").value="";//清空
        // window.location.href="/back/userAdd.jsp";
    }
</script>
<body>
<form action="/login" method="get">
    ${result}
    <div>用户名：<input type="text" id="username" name="username"/><span id="spanUsername"></span></div>
    <div>密码：<input type="text" id="password" name="password"/><span id="spanPassword"></span></div>
    <div>验证码：<input type="text" id="code" name="code"/><img src="/code" onclick="changeImg(this)">
    </div>
    <div><input type="submit" value="登录" onclick="return judge()">
        <input type="button" value="注册" onclick="toRegisterJsp()">
    </div>

</form>
</body>
</html>
